home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2171 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.7 KB  |  42 lines

  1. Newsgroups: comp.lang.c++
  2. Path: netcom.com!marnold
  3. From: marnold@netcom.com (Matt Arnold)
  4. Subject: Re: Help!!! No outport, outportb in BC++4.5 /Win32???
  5. Message-ID: <marnoldDL9IzB.GEw@netcom.com>
  6. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  7. References: <4d2g4p$8t4@newsserver.rrzn.uni-hannover.de> <4dcu8r$2k3@linet02.li.net>
  8. Date: Tue, 16 Jan 1996 07:18:47 GMT
  9. Sender: marnold@netcom7.netcom.com
  10.  
  11. bsilvern@li.net (Bob Silvern) writes:
  12.  
  13. >wulff@nwfs.rz.fh-hannover.de (Stefan Wulff) wrote:
  14.  
  15. >>It seems that there aren't the commands outport, outportb,... or 
  16. >>something like this in BC++4.5 for Win32.
  17. >>But i need them.
  18. >>Please give me an advice!
  19.  
  20. >I too found that pretty anoying.  I wrote these macros to ease the 16 to 32 bit
  21. [...]
  22. > #define outportb(p, d) {_DX = p; _AL = d; asm out dx,al;}
  23. > #define outport(p, d)  {_DX = p; _AX = d; asm out dx,ax;}
  24. [...]
  25.  
  26. The IO functions where left out intentionally as the Win32 API is supposed 
  27. to be processor-independent.  You aren't supposed to do direct hardware 
  28. IO, interrupt-handling, etc. from a Win32 executable.  I'm surprised 
  29. Borland C++ even compiles these macros (and I even checked).
  30.  
  31. But, do these hand-assembled IO sequences actually do anything when 
  32. executed?
  33.  
  34. Regards,
  35. -------------------------------------------------------------------------
  36. Matt Arnold                       |        | ||| | |||| |  | | || ||
  37. marnold@netcom.com                |        | ||| | |||| |  | | || ||
  38. Boston, MA                        |      0 | ||| | |||| |  | | || ||
  39. 617.389.7384 (h) 617.576.2760 (w) |        | ||| | |||| |  | | || ||
  40. C++, MIDI, Win32/95 developer     |        | ||| 4 3 1   0 8 3 || ||
  41. -------------------------------------------------------------------------
  42.